from matplotlib import pyplot as plt

chinese=[72,80,66,77,92]
math=[62,92,72,75,88]
english=[76,81,73,75,80]
plt.bar(range(1,6),chinese,color='r',label='chinese')
plt.bar(range(1,6),math,bottom=chinese,color='g',label='math')
chmath=[ chinese[i]+math[i] for i in range(5) ]
plt.bar(range(1,6),english,bottom=chmath,color='b',label='english')
plt.show()
